package com.csdj.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csdj.server.pojo.Employee;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xyx
 * @since 2022-12-12
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 员工查询 分页接口
     * @param page 分页所需的参数 列如 当前页码 页大小
     * @param employee 员工实体类
     * @param beginDateScope 入职日期查询 起始日期 和结束日期
     * @return
     */

    IPage<Employee> getEmployeeByPage(Page<Employee> page,
                                      @Param("employee") Employee employee,
                                      @Param("beginDateScope") LocalDate[] beginDateScope);
}
